// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.


suite("test_cast_to_decimal32_9_1_from_str") {

    // This test case is generated from the correspoinding be UT test case,
    // update this case if the correspoinding be UT test case is updated,
    // e.g.: ../run-be-ut.sh --run --filter=FunctionCastToDecimalTest.* --gen_regression_case
    sql "drop table if exists test_cast_to_decimal32_9_1_from_str_9_nullable;"
    sql "create table test_cast_to_decimal32_9_1_from_str_9_nullable(f1 int, f2 string) properties('replication_num'='1');"
    sql """insert into test_cast_to_decimal32_9_1_from_str_9_nullable values (0, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(1, "-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(2, "0"),(3, "1"),(4, "9"),(5, "9999999"),(6, "90000000"),(7, "90000001"),(8, "99999998"),(9, "99999999"),(10, "0."),(11, "1."),(12, "9."),(13, "9999999."),(14, "90000000."),(15, "90000001."),(16, "99999998."),(17, "99999999."),(18, "-0"),(19, "-1"),
      (20, "-9"),(21, "-9999999"),(22, "-90000000"),(23, "-90000001"),(24, "-99999998"),(25, "-99999999"),(26, "-0."),(27, "-1."),(28, "-9."),(29, "-9999999."),(30, "-90000000."),(31, "-90000001."),(32, "-99999998."),(33, "-99999999."),(34, ".04"),(35, ".14"),(36, ".84"),(37, ".94"),(38, ".05"),(39, ".15"),
      (40, ".85"),(41, ".94"),(42, "-.04"),(43, "-.14"),(44, "-.84"),(45, "-.94"),(46, "-.05"),(47, "-.15"),(48, "-.85"),(49, "-.94"),(50, "00400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(51, "01400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(52, "08400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(53, "09400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(54, "10400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(55, "11400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(56, "18400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(57, "19400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(58, "90400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(59, "91400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (60, "98400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(61, "99400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(62, "99999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(63, "99999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(64, "99999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(65, "99999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(66, "900000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(67, "900000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(68, "900000008400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(69, "900000009400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(70, "900000010400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(71, "900000011400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(72, "900000018400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(73, "900000019400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(74, "999999980400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(75, "999999981400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(76, "999999988400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(77, "999999989400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(78, "999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(79, "999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (80, "999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(81, "999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(82, "00500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(83, "01500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(84, "08500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(85, "09500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(86, "10500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(87, "11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(88, "18500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(89, "19500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(90, "90500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(91, "91500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(92, "98500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(93, "99500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(94, "99999990500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(95, "99999991500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(96, "99999998500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(97, "99999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(98, "900000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(99, "900000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (100, "900000008500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(101, "900000009500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(102, "900000010500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(103, "900000011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(104, "900000018500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(105, "900000019500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(106, "999999980500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(107, "999999981500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(108, "999999988500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(109, "999999989500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(110, "999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(111, "999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(112, "999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(113, "999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(114, "-00400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(115, "-01400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(116, "-08400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(117, "-09400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(118, "-10400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(119, "-11400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (120, "-18400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(121, "-19400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(122, "-90400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(123, "-91400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(124, "-98400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(125, "-99400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(126, "-99999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(127, "-99999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(128, "-99999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(129, "-99999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(130, "-900000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(131, "-900000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(132, "-900000008400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(133, "-900000009400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(134, "-900000010400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(135, "-900000011400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(136, "-900000018400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(137, "-900000019400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(138, "-999999980400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(139, "-999999981400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (140, "-999999988400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(141, "-999999989400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(142, "-999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(143, "-999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(144, "-999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(145, "-999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(146, "-00500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(147, "-01500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(148, "-08500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(149, "-09500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(150, "-10500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(151, "-11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(152, "-18500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(153, "-19500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(154, "-90500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(155, "-91500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(156, "-98500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(157, "-99500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(158, "-99999990500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(159, "-99999991500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (160, "-99999998500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(161, "-99999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(162, "-900000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(163, "-900000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(164, "-900000008500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(165, "-900000009500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(166, "-900000010500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(167, "-900000011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(168, "-900000018500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(169, "-900000019500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(170, "-999999980500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(171, "-999999981500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(172, "-999999988500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(173, "-999999989500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(174, "-999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(175, "-999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(176, "-999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(177, "-999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100")
      ,(178, null);
    """

    sql "set enable_strict_cast=true;"
    qt_sql_9_strict 'select f1, cast(f2 as decimalv3(9, 1)) from test_cast_to_decimal32_9_1_from_str_9_nullable order by 1;'

    sql "set enable_strict_cast=false;"
    qt_sql_9_non_strict 'select f1, cast(f2 as decimalv3(9, 1)) from test_cast_to_decimal32_9_1_from_str_9_nullable order by 1;'

    sql "drop table if exists test_cast_to_decimal32_9_1_from_str_9_not_nullable;"
    sql "create table test_cast_to_decimal32_9_1_from_str_9_not_nullable(f1 int, f2 string) properties('replication_num'='1');"
    sql """insert into test_cast_to_decimal32_9_1_from_str_9_not_nullable values (0, "0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(1, "-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e2147483647"),(2, "0"),(3, "1"),(4, "9"),(5, "9999999"),(6, "90000000"),(7, "90000001"),(8, "99999998"),(9, "99999999"),(10, "0."),(11, "1."),(12, "9."),(13, "9999999."),(14, "90000000."),(15, "90000001."),(16, "99999998."),(17, "99999999."),(18, "-0"),(19, "-1"),
      (20, "-9"),(21, "-9999999"),(22, "-90000000"),(23, "-90000001"),(24, "-99999998"),(25, "-99999999"),(26, "-0."),(27, "-1."),(28, "-9."),(29, "-9999999."),(30, "-90000000."),(31, "-90000001."),(32, "-99999998."),(33, "-99999999."),(34, ".04"),(35, ".14"),(36, ".84"),(37, ".94"),(38, ".05"),(39, ".15"),
      (40, ".85"),(41, ".94"),(42, "-.04"),(43, "-.14"),(44, "-.84"),(45, "-.94"),(46, "-.05"),(47, "-.15"),(48, "-.85"),(49, "-.94"),(50, "00400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(51, "01400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(52, "08400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(53, "09400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(54, "10400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(55, "11400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(56, "18400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(57, "19400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(58, "90400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(59, "91400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (60, "98400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(61, "99400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(62, "99999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(63, "99999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(64, "99999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(65, "99999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(66, "900000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(67, "900000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(68, "900000008400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(69, "900000009400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(70, "900000010400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(71, "900000011400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(72, "900000018400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(73, "900000019400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(74, "999999980400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(75, "999999981400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(76, "999999988400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(77, "999999989400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(78, "999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(79, "999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (80, "999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(81, "999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(82, "00500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(83, "01500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(84, "08500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(85, "09500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(86, "10500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(87, "11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(88, "18500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(89, "19500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(90, "90500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(91, "91500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(92, "98500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(93, "99500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(94, "99999990500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(95, "99999991500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(96, "99999998500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(97, "99999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(98, "900000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(99, "900000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (100, "900000008500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(101, "900000009500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(102, "900000010500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(103, "900000011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(104, "900000018500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(105, "900000019500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(106, "999999980500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(107, "999999981500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(108, "999999988500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(109, "999999989500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(110, "999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(111, "999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(112, "999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(113, "999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(114, "-00400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(115, "-01400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(116, "-08400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(117, "-09400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(118, "-10400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(119, "-11400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (120, "-18400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(121, "-19400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(122, "-90400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(123, "-91400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(124, "-98400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(125, "-99400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(126, "-99999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(127, "-99999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(128, "-99999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(129, "-99999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(130, "-900000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(131, "-900000001400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(132, "-900000008400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(133, "-900000009400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(134, "-900000010400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(135, "-900000011400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(136, "-900000018400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(137, "-900000019400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(138, "-999999980400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(139, "-999999981400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (140, "-999999988400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(141, "-999999989400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(142, "-999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(143, "-999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(144, "-999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(145, "-999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(146, "-00500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(147, "-01500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(148, "-08500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(149, "-09500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(150, "-10500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(151, "-11500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(152, "-18500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(153, "-19500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(154, "-90500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(155, "-91500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(156, "-98500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(157, "-99500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(158, "-99999990500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(159, "-99999991500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),
      (160, "-99999998500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(161, "-99999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(162, "-900000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(163, "-900000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(164, "-900000008500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(165, "-900000009500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(166, "-900000010500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(167, "-900000011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(168, "-900000018500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(169, "-900000019500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(170, "-999999980500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(171, "-999999981500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(172, "-999999988500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(173, "-999999989500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(174, "-999999990400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(175, "-999999991400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(176, "-999999998400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100"),(177, "-999999999400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.e-100");
    """

    sql "set enable_strict_cast=true;"
    qt_sql_9_strict 'select f1, cast(f2 as decimalv3(9, 1)) from test_cast_to_decimal32_9_1_from_str_9_not_nullable order by 1;'

    sql "set enable_strict_cast=false;"
    qt_sql_9_non_strict 'select f1, cast(f2 as decimalv3(9, 1)) from test_cast_to_decimal32_9_1_from_str_9_not_nullable order by 1;'

}